#ifndef MOTOR_H_INCLUDED
#define MOTOR_H_INCLUDED

#include "timer2.h"
#define NR_MOTOR_CKS NR_TC2_CKS
#define MOTOR_SPEED_MAX 1000
void motorInit( void );
DIST_T motorMove( DIST_T dist, MsgBox *mbox );
#define MOTOR_PORT PORTB
#define MOTOR_DDR  DDRB
#define MOTOR_EN   PB5
#define MOTOR_DIR  PB6
static void inline motorOff( void )
{
	SBI( MOTOR_PORT, MOTOR_EN );
}
static void inline motorOn( void )
{
	CBI( MOTOR_PORT, MOTOR_EN );
}
void motorSetSpeed( SPEED_T speed );
#endif /* MOTOR_H_INCLUDED */
